Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Web UI] Filter entities by given subscription #1656

Merged
merged 10 commits into from
Jun 18, 2018

Conversation

jamesdphillips
Copy link
Contributor

What is this change?

2018-06-07 11 50 16

Why is this change necessary?

Closes #1582

Does your change need a Changelog entry?

undefined

Do you need clarification on anything?

null

Were there any complications while making this change?

0

Signed-off-by: James Phillips <[email protected]>
Signed-off-by: James Phillips <[email protected]>
Signed-off-by: James Phillips <[email protected]>
@jamesdphillips jamesdphillips added ready-for-review component:web-ui Sensu dashboard improvements labels Jun 7, 2018
@jamesdphillips jamesdphillips requested a review from 10xjs June 7, 2018 19:01
static fragments = {
subscriptions: gql`
fragment EntitiesListHeader_subscriptions on SubscriptionSet {
entries(orderBy: FREQUENCY)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this run the risk of returning a dangerously large result without a limit?

I think making this it's own query would be a good idea. With query batching there wouldn't be any overhead, and it would set us up for fetching this list in chunks if we need to or refetching it independently of the main page content.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this run the risk of returning a dangerously large result without a limit?

From looking around the set could probably be in the hundreds, so it is probably worth adding a limit (and offset.) 👍

I think making this it's own query would be a good idea.

I like your thinking here, with a limit implemented, it would make it easy to implement react virtualized and friends. However, with the design in flux, I think I'll leave it as is for the time being. Lest I build a more involved solution all for naught.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool cool cool

environment={environment}
loading={loading || aborted}
onQueryChange={this.props.setQueryParams}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use onChangeQuery for consistency with other event handler props: on{EventName}{TargetName}

Copy link
Contributor

@10xjs 10xjs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮

@jamesdphillips jamesdphillips merged commit 4556e4e into master Jun 18, 2018
@jamesdphillips jamesdphillips deleted the web/filter-subscriptions branch June 18, 2018 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:web-ui Sensu dashboard improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants